int x;
int num;
- int rowstride;
guchar *pixels, *p;
if (!gdk_color_parse (color, &col))
FALSE, 8,
16, 16);
- rowstride = gdk_pixbuf_get_rowstride (pixbuf);
p = pixels = gdk_pixbuf_get_pixels (pixbuf);
num = gdk_pixbuf_get_width (pixbuf) *
on_toggle_hexpand (GtkToggleButton *toggle,
void *data)
{
- GtkWidget *parent;
-
- /* get the event box with color set on it */
- parent = gtk_widget_get_parent (gtk_widget_get_parent (GTK_WIDGET (toggle)));
-
g_object_set (toggle,
"hexpand", gtk_toggle_button_get_active (toggle),
NULL);
on_toggle_vexpand (GtkToggleButton *toggle,
void *data)
{
- GtkWidget *parent;
-
- /* get the event box with color set on it */
- parent = gtk_widget_get_parent (gtk_widget_get_parent (GTK_WIDGET (toggle)));
-
g_object_set (toggle,
"vexpand", gtk_toggle_button_get_active (toggle),
NULL);
GtkWidget *vbbox;
GtkWidget *button;
GtkWidget *dialog;
- GtkWidget *prop_editor;
GtkWidget *extra;
GtkFileFilter *filter;
GtkWidget *preview_vbox;
/* Extra controls for manipulating the test environment
*/
- prop_editor = create_prop_editor (G_OBJECT (dialog), GTK_TYPE_FILE_CHOOSER);
+ create_prop_editor (G_OBJECT (dialog), GTK_TYPE_FILE_CHOOSER);
control_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
{
GtkWidget *widget = GTK_WIDGET (button);
GdkDevice *device;
- gint failure;
device = gtk_get_current_event_device ();
if (device == NULL)
data->cursor = gdk_cursor_new_for_display (gtk_widget_get_display (widget),
GDK_TARGET);
- failure = gdk_device_grab (device,
- gtk_widget_get_window (widget),
- GDK_OWNERSHIP_APPLICATION,
- TRUE,
- GDK_BUTTON_RELEASE_MASK,
- data->cursor,
- GDK_CURRENT_TIME);
+ gdk_device_grab (device,
+ gtk_widget_get_window (widget),
+ GDK_OWNERSHIP_APPLICATION,
+ TRUE,
+ GDK_BUTTON_RELEASE_MASK,
+ data->cursor,
+ GDK_CURRENT_TIME);
g_signal_connect (button, "event",
G_CALLBACK (snapshot_widget_event), data);
/* Font Fill */
cairo_set_source_rgb (cr, 0, 0.0, 1.0);
cairo_fill (cr);
-
+
g_object_unref (layout);
}
int
main (int argc, char **argv)
{
- GMainLoop *loop;
GtkPrintOperation *print;
- GtkPrintOperationResult res;
GtkPrintSettings *settings;
- g_type_init ();
-
- loop = g_main_loop_new (NULL, TRUE);
+ g_type_init ();
settings = gtk_print_settings_new ();
/* gtk_print_settings_set_printer (settings, "printer"); */
-
+
print = gtk_print_operation_new ();
gtk_print_operation_set_print_settings (print, settings);
gtk_print_operation_set_n_pages (print, 1);
gtk_print_operation_set_unit (print, GTK_UNIT_MM);
g_signal_connect (print, "draw_page", G_CALLBACK (draw_page), NULL);
- res = gtk_print_operation_run (print, GTK_PRINT_OPERATION_ACTION_PRINT, NULL, NULL);
+ gtk_print_operation_run (print, GTK_PRINT_OPERATION_ACTION_PRINT, NULL, NULL);
return 0;
}
GtkWidget *vbbox;
GtkWidget *button;
GtkWidget *dialog;
- GtkWidget *prop_editor;
GtkRecentFilter *filter;
gint i;
gboolean multiple = FALSE;
gtk_widget_show_all (dialog);
- prop_editor = create_prop_editor (G_OBJECT (dialog), GTK_TYPE_RECENT_CHOOSER);
+ create_prop_editor (G_OBJECT (dialog), GTK_TYPE_RECENT_CHOOSER);
control_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);